package org.jeecg.modules.backups.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.backups.entity.Backups;
import org.jeecg.modules.backups.mapper.BackupsMapper;
import org.jeecg.modules.backups.service.IBackupsService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 备份
 * @Author: jeecg-boot
 * @Date:   2024-11-18
 * @Version: V1.0
 */
@Service
public class BackupsServiceImpl extends ServiceImpl<BackupsMapper, Backups> implements IBackupsService {

    @Override
    public Backups getByFileName(String fileName) {
        LambdaQueryWrapper<Backups> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(Backups::getFileName, fileName);
        return baseMapper.selectOne(wrapper);
    }
}
